
<script type="text/javascript">
$(document).ready(function() {
   
    $("input[name=content_type][value=<?php echo $this->content_type ?>]").attr("checked","true");
        
	$("input[name=content_type]").change(function()
    {
            var sel_val = $("input[name=content_type]:checked").val();
            
            if (sel_val ==1){
                $('.form_image').show();
                $('.form_html').hide();
                $('.form_iframe').hide()
                
                $(".html").hide();
            }else if (sel_val ==2){
                $('.form_image').hide();
                $('.form_html').show();
                $('.form_iframe').hide();
                $(".html").show();
            } else if (sel_val ==3){
                $('.form_image').hide();
                $('.form_html').hide();
                $('.form_iframe').show();
                $(".html").hide();
            }
    });
        
    //call event change select type
	$("input[name=content_type]").change();
        
    //add element to form html
    $("#html-label").after(' <span class="editorlink"><a onclick="editor(\'html\'); return false;" href="#" id="editor" class="on">Editor</a> <a onclick="remove_editor(\'html\'); return false;"  id="source" href="#">Source</a></span> ')
});
</script>

<?php if ($this->is_updated){ ?>
    <div class='success'> 
        <?php echo $this->translate("MSG_UPDATED_SUCCESS") ?>
        <!--<span id="close" onclick="close_element('success');" >x</span>-->
    </div>
<?php }?>

<div class='box_list_radio'>
    <table  class="config_select_type">
        <tr>
            <td id ="select_type" ><?php echo $this->translate("LBL_SELECT_TYPE") ?></td>
            <td align="left">
                <span ><input type="radio" name="content_type" value ='1' checked="true"><?php echo $this->translate("LBL_IMAGE") ?></span>
                <span><input type="radio" name="content_type" value ='2'><?php echo $this->translate("LBL_HTML") ?></span>
                <span><input type="radio" name="content_type" value ='3'><?php echo $this->translate("LBL_IFRAME") ?></span>
            </td>
            
        </tr>
    </table>
</div>
<?php echo $this->image_form ?>

<span class="editorlink form_html">
    <?php echo $this->html_form ?>
</span>

<?php echo $this->iframe_form ?>

